This is a file with instructions for replication package for the paper "Minimum Wage Effects and Monopoly Explanations" by Justin C. Wiltshire, Carl McPherson, Michael Reich, and Denis Sosinskiy forthcoming in Journal of Labor Economics. 


1. Structure
The root folder includes four subfolders: (1) "do" containing all of the code used to recreate paper's results, (2) "dta" containing both source and cleaned data used in the project, (3) "log" -- empty folder where all logs will be saved, and "out" containing tables and figures for the paper. 

Note, that running the code will overwrite included processed data, tables and figures. 


2. Set Up
- First uncommented line of the "do/settings.do" file specifies working directory for the project. This has to be changed for the desired path before running any code. 
- Initial working directory should be set to the location of "settings.do" file
- Some analyses require the use of Stata package "stackscpvals". If automatic download of the package does not work, files "stackscpvals.ado" and "stackscpvals.sthlp" need to be copied to an "ado/personal" folder. 


3. Data
Below we list all data sets used in the replication package, their location, and describe how it was obtained.

	1) Quarterly Census of Employment and Wages (QCEW). The file containing unprocessed data from QCEW is located in "$projdir/dta/build/src/qcew_panel_raw.dta". It was downloaded from BLS website using the code provided in "$projdir/do/other/qcew_pull.do". 

	2) Quarterly Workforce Indicators (QWI). The file containing unprocessed data from QWI is located in "$projdir/dta/build/src/qwi_raw_08102023.csv". It was obtained using LED Extraction Tool at https://ledextract.ces.census.gov/. 

	3) Current Population Survey (CPS). The files containing unprocessed data from CPS are located in "$projdir/dta/build/src/epi_cpsorg_2009_2024". It was downloaded from CEPR data website at https://ceprdata.org/cps-uniform-data-extracts/cps-outgoing-rotation-group/cps-org-data/.

	4) The Local Area Unemployment Statistics (LAUS). The files containing unprocessed data from LAUS are located in "$projdir/dta/build/src/laus". It was downloaded from BLS website using the code 	provided in "$projdir/do/other/laus_pull.do".

	5) Google Mobility data (GM). The files containing GM data are "$projdir/dta/build/src/gm_county.dta" and "$projdir/dta/build/src/gm_state.dta", for county and satte levels, respectively. Both datasets were downloaded from Opportunity Insights GitHub at https://github.com/OpportunityInsights/EconomicTracker/tree/main/data. 

	6) Minimum Wages. The unprocessed data on state and substate minimum wages is provided in "$projdir/dta/build/src/mw_panel/mw_state_quarterly.dta" and 	"$projdir/dta/build/src/mw_panel/mw_substate_quarterly.dta", respectively. They were obtained using files provided at https://github.com/benzipperer/historicalminwage. Additional, hand-coded crosswalk created by authors is provided at "$projdir/dta/build/src/mw_panel/hand_coded_geo_xwalk.dta" to assign substate minimum wages to a county FIPS.   

	7) County population. Unprocessed county population data is provided in "$projdir/dta/build/src/county_pop.csv". It was obtained from publicly available Census data. 

	8) McDonald's data (MCD). MCD data was provided by Orley Ashenfelter and Stepan Jurajda. It is a private dataset which we cannot share publicly. The package includes code for analyses using MCD  but does not execute them. Results are also included in corresponding folders. 

4. Implementation 
"do" folder includes two files: "master.do" and "settings.do", and two subfolders: "build" and "analysis". After set up described in part 2 above, the "$projdir/do/master.do" can be ran to implement all of the data cleaning and analyses for the paper (excluding ones using private data). Otherwise, any code processing or analyzing data can be ran separately. In that case, file "settings.do" should be ran in the beginning of each session prior to executing any other code. The purpose of each do file is described below.

	- $projdir/do/build:
	1_google_build.do: clean Google Mobility data; 
	2_cps_build.do: combine and clean CPS data; 
	3_laus_build.do: combine and clean LAUS data;
	4_qcew_build.do: clean QCEW data;
	5_qwi_build.do: clean QWI data;
	6_cty_mw_growth_build.do: create data sets with minimum wage growth for the samples and years of interest;
	7_cty_samples_build.do: create data sets with treated and donor counties to be used during some analysis;
	cw/cty_changes.do: crosswalk for counties used in some analyses;
	cw_cty_changes_NYCcombine: crosswalk for counties used in most analyses;

	- $projdir/do/analysis/main:
	1_qcew_synth.do: generate synthetic control (SC) and placebo tests for each treated county using QCEW for outcomes of interest;
	2_qcew_stack.do: stack QCEW SC for samples of interest;
	3_qwi_synth.do: generate (SC) and placebo tests for each treated county using QWI for outcomes of interest;
	4_qwi_stack.do: stack QWI SC for samples of interest;
	5_mcd_synth.do: (1) generate SC and placebo tests for each treated county using QCEW data but subsample of counties available in McDonald's data for outcomes of interest, and (2) 	apply SC weights from (1) to McDonald's data;
	6_mcd_stack.do: (1) stack QCEW SC for MCD subsample and (2) stack SC for MCD data;
	7_tables.do: generate all tables from the main paper;
	8_figures.do: generate all figures from the main paper.

Finally, all of the results and data generated during the analysis is saved to "$projdir/dta/analysis". While replication package comes with all intermediate data included (except private data), running analyses rewrites existing files. 



Any questions regarding the replication package can be addressed to Denis Sosinskiy via dsosinskiy@ucdavis.edu.
